﻿using System;

namespace Microsoft.SPOT.Hardware
{
    public static class Cpu
    {
        public static TimeSpan GlitchFilterTime { get; set; }
        public static uint SlowClock { get; set; }
        public static uint SystemClock { get; set; }

        public enum Pin
        {
            GPIO_NONE = -1,
            GPIO_Pin0 = 0,
            GPIO_Pin1 = 1,
            GPIO_Pin2 = 2,
            GPIO_Pin3 = 3,
            GPIO_Pin4 = 4,
            GPIO_Pin5 = 5,
            GPIO_Pin6 = 6,
            GPIO_Pin7 = 7,
            GPIO_Pin8 = 8,
            GPIO_Pin9 = 9,
            GPIO_Pin10 = 10,
            GPIO_Pin11 = 11,
            GPIO_Pin12 = 12,
            GPIO_Pin13 = 13,
            GPIO_Pin14 = 14,
            GPIO_Pin15 = 15,
        }

        [Flags]
        public enum PinUsage
        {
            NONE = 0,
            INPUT = 1,
            OUTPUT = 2,
            ALTERNATE_A = 4,
            ALTERNATE_B = 8,
        }

        [Flags]
        public enum PinValidInterruptMode
        {
            NONE = 0,
            InterruptEdgeLow = 2,
            InterruptEdgeHigh = 4,
            InterruptEdgeBoth = 8,
            InterruptEdgeLevelHigh = 16,
            InterruptEdgeLevelLow = 32,
        }

        [Flags]
        public enum PinValidResistorMode
        {
            NONE = 0,
            Disabled = 1,
            PullUp = 2,
            PullDown = 4,
        }
    }
}
